# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: bzklrm <bzklrm@gmail.com>
# Additional contributors Senjin, Xavier, dundee

pkgname=glpk
pkgver=5.0
pkgrel=1
pkgdesc="GNU Linear Programming Kit : solve LP, MIP and other problems."
arch=('x86_64')
url="https://www.gnu.org/software/glpk/glpk.html"
license=('GPL')
depends=('gmp')
source=(https://ftp.gnu.org/gnu/glpk/${pkgname}-${pkgver}.tar.gz{,.sig})
sha1sums=('3a85b1e4c806b91deebfcf9a845b9308cd785d64'
          'SKIP')
validpgpkeys=('A2B56CCB42220C06481335BAD17BF2305981E818') # Andrew Makhorin

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr --with-gmp
  make
}

package(){
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 doc/glpk.pdf "${pkgdir}/usr/share/doc/glpk/glpk.pdf"
  install -Dm644 doc/gmpl.pdf "${pkgdir}/usr/share/doc/glpk/gmpl.pdf"
}
